﻿<%@ Page Title="" Language="C#" MasterPageFile="~/App_MasterPages/layout.Master" AutoEventWireup="true" CodeBehind="AddOpinion.aspx.cs" Inherits="blackhouse.StareKino.Web.AddOpinion" %>

<%@ Register Assembly="blackhouse.Web.Controls" Namespace="blackhouse.Web.Controls" TagPrefix="blackhouse" %>
<%--<%@ Register Src="~/Modules/Interviewer.ascx" TagPrefix="blackhouse" TagName="Interviewer" %>--%>


<asp:Content ID="Content1" ContentPlaceHolderID="leftContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" runat="server">
    <section id="add-opinion">
        <div id="opinionsHeader" class="topBlueHeader">
            <div class="hgroup">
                <h1><%=GetGlobalResourceObject("Opinions", "anoOpinion")%></h1>
            </div>

        </div>
        <div class="cleaner"></div>
        <asp:Panel runat="server" ID="pnlForm" Visible="false">
            <div class="brownContent" id="add-opinion-info">

                <p>
                    <%=GetGlobalResourceObject("Opinions", "anoOpinion")%>
                </p>
                <ul>
                    <li>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" CssClass="add-error" runat="server" ControlToValidate="txtPseudonim" Display="Dynamic" EnableClientScript="true" SetFocusOnError="true" ErrorMessage="<%$ Resources:Opinions, addOpinionErr1 %>">*</asp:RequiredFieldValidator>
                        <asp:Label ID="Label1" runat="server" AssociatedControlID="txtPseudonim"><%=GetGlobalResourceObject("Opinions", "addOpinionF1")%>:</asp:Label>
                        <asp:TextBox runat="server" ID="txtPseudonim"></asp:TextBox>
                    </li>
                    <li>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" CssClass="add-error" runat="server" ControlToValidate="txtCountry" Display="Dynamic" EnableClientScript="true" SetFocusOnError="true" ErrorMessage="<%$ Resources:Opinions, addOpinionErr2 %>">*</asp:RequiredFieldValidator>
                        <asp:Label ID="Label2" runat="server" AssociatedControlID="txtCountry"><%=GetGlobalResourceObject("Opinions","country").ToFirstUpperString() %>:</asp:Label>
                        <blackhouse:CountryTextBox runat="server" ID="txtCountry"></blackhouse:CountryTextBox>
                    </li>
                    <li>
                        <asp:Label ID="Label3" runat="server" AssociatedControlID="txtInPlus"><%=GetGlobalResourceObject("Opinions","iLike") %>:</asp:Label>
                        <asp:TextBox runat="server" ID="txtInPlus" TextMode="MultiLine"></asp:TextBox>
                    </li>
                    <li>
                        <asp:Label ID="Label4" runat="server" AssociatedControlID="txtInNinus"><%=GetGlobalResourceObject("Opinions","iDisLike") %>:</asp:Label>
                        <asp:TextBox runat="server" ID="txtInNinus" TextMode="MultiLine"></asp:TextBox>
                    </li>
                </ul>

            </div>

            <h3 class="bottomLine"><%=GetGlobalResourceObject("Opinions","detailsScore") %>:</h3>
            <p><%=GetGlobalResourceObject("Opinions","detailsScoreInfo") %></p>

            <asp:Repeater runat="server" ID="rptCategories" OnItemDataBound="ItemDataBound_rptCategories">
                <HeaderTemplate>
                    <div class="opinion-categories">
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Panel runat="server" ID="pnlCat" CssClass="category-line">
                        <asp:Label runat="server" ID="lblCatName" CssClass="label"></asp:Label>:
                            <asp:TextBox ReadOnly="true" runat="server" ID="txtCatVal" CssClass="input-value"></asp:TextBox>
                        <div class="slider" data-panel="slider">
                        </div>
                    </asp:Panel>
                </ItemTemplate>
                <FooterTemplate></div></FooterTemplate>
            </asp:Repeater>
            <asp:HiddenField runat="server" ID="hdStayType" Value="Anonim" />
            <h3 class="bottomLine">Avatar:</h3>
            <p><%=GetGlobalResourceObject("Opinions", "addOpinionF2")%>:</p>
            <ul class="staytype" data-panel="staytype">
                <li class="selected" data-panel="staytype-item">
                    <img src="/Data/SiteImages/Person/anonim.jpg" title="Anonim" />
                    <span><%=GetGlobalResourceObject("Opinions", "addOpinionS1")%></span>
                </li>

                <li data-panel="staytype-item">
                    <img src="/Data/SiteImages/Person/biznes.jpg" title="<%=GetGlobalResourceObject("Aparts","business").ToFirstUpperString() %>" />
                    <span><%=GetGlobalResourceObject("Aparts","business").ToFirstUpperString() %></span>
                </li>

                <li data-panel="staytype-item">
                    <img src="/Data/SiteImages/Person/rodzina-z-dzieckiem.jpg" title="<%=GetGlobalResourceObject("Aparts","familyOne").ToFirstUpperString() %>" />
                    <span><%=GetGlobalResourceObject("Aparts","familyOne").ToFirstUpperString() %></span>
                </li>


                <li data-panel="staytype-item">
                    <img src="/Data/SiteImages/Person/turystyka.jpg" title="<%=GetGlobalResourceObject("Aparts","familyLarge").ToFirstUpperString() %>" />
                    <span><%=GetGlobalResourceObject("Aparts","familyLarge").ToFirstUpperString() %></span>
                </li>


                <li data-panel="staytype-item">
                    <img src="/Data/SiteImages/Person/rodzina-wielodzietna.jpg" title="<%=GetGlobalResourceObject("Aparts","tourist").ToFirstUpperString() %>" />
                    <span><%=GetGlobalResourceObject("Aparts","tourist").ToFirstUpperString() %></span>
                </li>
            </ul>
            <div class="cleaner"></div>
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode="List" CssClass="add-opinion-errors" HeaderText="<%$ Resources:Opinions, addOpinionErr3 %>" />
            <div class="blue-button-right-wrapper">
                <asp:Button runat="server" ID="bntSave" CssClass="blue-button" Text="<%$ Resources:Opinions, save %>" UseSubmitBehavior="true" OnClick="bntSave_Click" />
            </div>
        </asp:Panel>
        <asp:Panel runat="server" ID="pnlNoData" Visible="false" CssClass="brownContent">
            <h3 class="bottomLine">Dodanie opinii jest niemożliwe</h3>
            <p>Nie możesz dodać rezerwacji, ponieważ adres url jest niepoprawny (nie zawiera poprawnych danych).</p>
            <asp:Panel runat="server" ID="pnlStillAddOpinion" CssClass="add-opn-admin" Visible="false">
                Jesteś zalogowany jako administrator, w związku z czym możesz sam dodać opinię.<br />
                Wybierz typ apartamentu, a ja znajdę zamkniętą rezerwację, i przekieruje Cię do formularza dodawania opinii.<br />
                <br />
                <asp:Label ID="Label5" runat="server" AssociatedControlID="ddlApartmentTypes">
                      Typ apartamentu: </asp:Label>
                <asp:DropDownList AppendDataBoundItems="true" DataTextField="ShortName" DataValueField="Id" runat="server" ID="ddlApartmentTypes" OnSelectedIndexChanged="ddlApartmentTypes_SelectedIndexChanged" AutoPostBack="true">
                    <asp:ListItem Text=" - " />
                </asp:DropDownList>
                <br />
                <asp:Label runat="server" ID="lblNoFreeReservation" Visible="false">Dla wybranego typu apartamentu nie można dodać opinii</asp:Label>
            </asp:Panel>
        </asp:Panel>
        <asp:Panel runat="server" ID="pnlOk" Visible="false" CssClass="brownContent">
            <h3 class="bottomLine"><%=GetGlobalResourceObject("Opinions", "addOpinionS2")%></h3>
            <p><%=GetGlobalResourceObject("Opinions", "addOpinionS3")%></p>
        </asp:Panel>
    </section>
    <%--<blackhouse:Interviewer runat="server" id="Interviewer" />--%>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="rightContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="pageEditContent" runat="server">
</asp:Content>
